package com.example.dblibrary.database.entities;




import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.ForeignKey;
import android.arch.persistence.room.Index;
import android.arch.persistence.room.PrimaryKey;

import com.example.dblibrary.database.AppDatabase;

import static android.arch.persistence.room.ForeignKey.CASCADE;


@Entity(tableName = AppDatabase.table_song_type,foreignKeys = @ForeignKey(entity = Song.class,parentColumns = "SONGS_TYPE",childColumns = "TYPE_ID",onDelete = CASCADE),
        indices = @Index(value={"TYPE_ID"},unique = true))
public class SongType {

    @PrimaryKey
    @ColumnInfo(name = "TYPE_ID")
    public String type_id;
    @ColumnInfo(name = "TYPE_CATEGORY")
    public String type_category;
    @ColumnInfo(name = "TYPE_VALUE")
    public String type_value;

    public String getType_id() {
        return type_id;
    }

    public void setType_id(String type_id) {
        this.type_id = type_id;
    }

    public String getType_category() {
        return type_category;
    }

    public void setType_category(String type_category) {
        this.type_category = type_category;
    }

    public String getType_value() {
        return type_value;
    }

    public void setType_value(String type_value) {
        this.type_value = type_value;
    }
}
